﻿#region  文件信息

// ---------------------------------------------------------------------------------------
// <copyright file="JsonPage.cs" company="">
// 作者：李帅伦
// </copyright>
// <summary>
// 类型简介：
// 类型详细：JsonPage.cs
// 创建时间：2015-03-22 16:07
// 修改时间：2015-03-22 15:52
// </summary>
// ---------------------------------------------------------------------------------------
#endregion

namespace Jiekou.Com
{
    #region

    using System.Collections.Generic;

    using WebCommon;

    #endregion

    /// <summary>
    /// The json page.
    /// </summary>
    /// <typeparam name="T">
    /// </typeparam>
    public class JsonPage<T> : PageListJs<T>
        where T : class
    {
        #region Public Methods and Operators

       

        /// <summary>
        /// 的
        /// </summary>
        /// <param name="list"></param>
        /// <param name="rows"></param>
        /// <param name="page"></param>
        public JsonPage(IEnumerable<T> list, int rows,int page)
            : base(list, rows,page)
        {
        }

        /// <summary>
        /// The get json page.
        /// </summary>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public object GetJsonPage()
        {
            return new
                       {
                           list = this.DataList,
                           count = this.DataList.Count
                       };
        }

        #endregion
    }
}